Setup

knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)
library(R.utils)
library(wbCorr)
library(readxl)
library(kableExtra)
library(brms)
library(bayesplot)
library(beepr)


source(file.path('Functions', 'ReportModels.R'))
source(file.path('Functions', 'PrettyTables.R'))
source(file.path('Functions', 'ReportMeasures.R'))
source(file.path('Functions', 'PrepareData.R'))
system("shutdown /a")
## [1] 1116
# Set options for analysis
use_mi = FALSE
shutdown = FALSE
report_ordinal = FALSE

options(
  dplyr.print_max = 100, 
  brms.backend = 'cmdstan',
  brms.file_refit = ifelse(use_mi, 'never', 'on_change'),
  error = function() beepr::beep(sound = 5)
)
df <- openxlsx::read.xlsx(file.path('long.xlsx'))
df_original <- df

df_double <- prepare_data(df, use_mi = use_mi)[[1]]

Constructing scales Re-coding pusing reshaping data (4field) centering data within and between

Modelling

# For indistinguishable Dyads
model_rows_fixed <- c(
    'Intercept', 
    # '-- WITHIN PERSON MAIN EFFECTS --', 
    'persuasion_self_cw', 
    'persuasion_partner_cw', 
    'pressure_self_cw', 
    'pressure_partner_cw', 
    'pushing_self_cw', 
    'pushing_partner_cw', 
    'day', 
    'weartime_self_cw',
    
    'support_self_cw',
    'support_partner_cw',
    'isWeekendWeekend',
    'got_JITAI_selfJITAIreceived',
    'skilled_supportDaysafterIntervention',
    
    
    # '-- BETWEEN PERSON MAIN EFFECTS',
    'persuasion_self_cb',
    'persuasion_partner_cb',
    'pressure_self_cb',
    'pressure_partner_cb',
    'pushing_self_cb',
    'pushing_partner_cb',
    'weartime_self_cb',
    'studyGroupFirst3weeksinterventions',
    'studyGrouplast3weeksinterventions'
  )


model_rows_fixed_ordinal <- c(
  model_rows_fixed[1],
  'Intercept[1]',
  'Intercept[2]',
  'Intercept[3]',
  'Intercept[4]',
  'Intercept[5]',
  model_rows_fixed[2:length(model_rows_fixed)]
)

model_rows_random <- c(
  # '--------------',
  # '-- RANDOM EFFECTS --',
  'sd(Intercept)', 
  'sd(persuasion_self_cw)',
  'sd(persuasion_partner_cw)',
  'sd(pressure_self_cw)',
  'sd(pressure_partner_cw)',
  'sd(pushing_self_cw)',
  'sd(pushing_partner_cw)',
  # '-- CORRELATION STRUCTURE -- ', 
  'ar[1]', 
  'nu',
  'shape',
  'sderr',
  'sigma'
)

model_rows_random_ordinal <- c(model_rows_random,'disc')
# For indistinguishable Dyads
model_rownames_fixed <- c(
    'Intercept', 
    # '-- WITHIN PERSON MAIN EFFECTS --', 
    'Daily perceived persuasion target -> target', 
    'Daily perceived persuasion target -> agent', 
    'Daily perceived pressure target -> target', 
    'Daily perceived pressure target -> agent', 
    'Daily perceived pushing target -> target', 
    'Daily perceived pushing target -> agent', 
    'Day', 
    'Daily weartime',
    
    'Daily perceived support target -> target',
    'Daily perceived support target -> agent',
    'Is a weekend',
    'JITAI received',
    'Days post skilled support intervention',
    
    # '-- BETWEEN PERSON MAIN EFFECTS',
    'Mean perceived persuasion target -> target',
    'Mean Perceived persuasion target -> agent',
    'Mean Perceived pressure target -> target',
    'Mean Perceived pressure target -> agent',
    'Mean Perceived pushing target -> target',
    'Mean Perceived pushing target -> agent',
    'Mean weartime',
    
    'Difference study group 2',
    'Difference study group 3'
  )


model_rownames_fixed_ordinal <- c(
  model_rownames_fixed[1],
  'Intercept[1]',
  'Intercept[2]',
  'Intercept[3]',
  'Intercept[4]',
  'Intercept[5]',
  model_rownames_fixed[2:length(model_rownames_fixed)]
)

model_rownames_random <- c(
  # '--------------',
  # '-- RANDOM EFFECTS --',
  'sd(Intercept)', 
  'sd(Daily perceived persuasion target -> target)', 
  'sd(Daily perceived persuasion target -> agent)', 
  'sd(Daily perceived pressure target -> target)', 
  'sd(Daily perceived pressure target -> agent)', 
  'sd(Daily perceived pushing target -> target)', 
  'sd(Daily perceived pushing target -> agent)', 
  # '-- CORRELATION STRUCTURE -- ', 
  'ar[1]', 
  'nu',
  'shape',
  'sderr',
  'sigma'
)

model_rownames_random_ordinal <- c(model_rownames_random,'disc')
rows_to_pack <- list(
  "Within-Person Effects" = c(2,14),
  "Between-Person Effects" = c(15,23),
  "Random Effects" = c(24, 30), 
  "Additional Parameters" = c(31,35)
  )

rows_to_pack_ordinal <- list(
  "Intercepts" = c(1,6),
  "Within-Person Effects" = c(2+5,14+5),
  "Between-Person Effects" = c(15+5,23+5),
  "Random Effects" = c(24+5, 30+5), 
  "Additional Parameters" = c(31+5,35+6)
  )

Subjective MVPA

range(df_double$pa_sub, na.rm = T) 
## [1]   0 720
hist(df_double$pa_sub, breaks = 100) 

Modelling using the gaussian family fails. Due to the many zeros, transformations won’t help estimating the models. We employ the negative binomial family.

formula <- bf(
  pa_sub ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    #support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    isWeekend + 
    got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    studyGroup +
    
    day + 
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)




prior1 <- c(
  brms::set_prior("normal(0, 2.5)", class = "b"),
  brms::set_prior("normal(0, 50)", class = "Intercept", lb = 0),
  
  brms::set_prior("normal(0, 10)", class = "sd", group = "coupleID", lb = 0),
  
  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 20)", class = "shape"), 
  brms::set_prior("cauchy(0, 10)", class='sderr')
)

#df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

pa_sub <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = brms::negbinomial(),
  #control = list(adapt_delta = 0.99),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "NoExchangeProcesses_pa_sub")
)
pp_check(pa_sub, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(pa_sub)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(pa_sub)
## 
## Computed from 12000 by 3736 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo -12067.8 177.4
## p_loo        41.0   3.3
## looic     24135.5 354.9
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.3, 1.9]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)     3734  99.9%   433     
##    (0.7, 1]   (bad)         2   0.1%   <NA>    
##    (1, Inf)   (very bad)    0   0.0%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(pa_sub, ask = FALSE)

summarize_brms(
  pa_sub, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
IRR l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 31.71* 20.56 49.41 1.003 2465.34 5312.65
Within-Person Effects
Daily perceived persuasion target -> target 0.98 0.88 1.10 1.000 13549.48 8955.59
Daily perceived persuasion target -> agent 0.93 0.84 1.04 1.000 16959.96 9134.23
Daily perceived pressure target -> target 1.02 0.78 1.37 1.000 14853.77 8626.76
Daily perceived pressure target -> agent 0.65* 0.52 0.85 1.000 14691.56 7780.60
Daily perceived pushing target -> target 1.03 0.89 1.22 1.000 13937.22 9633.32
Daily perceived pushing target -> agent 1.11 0.95 1.30 1.001 14611.46 9749.75
Day 0.98 0.64 1.54 1.000 9669.62 8932.25
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA
Is a weekend 1.04 0.85 1.28 1.000 16036.75 8748.99
JITAI received 0.96 0.74 1.26 1.000 17828.32 9129.79
Days post skilled support intervention 1.10 0.78 1.53 1.000 8504.93 8881.39
Between-Person Effects
Mean perceived persuasion target -> target 1.12 0.66 1.93 1.001 5570.12 7614.15
Mean Perceived persuasion target -> agent 1.22 0.70 2.13 1.001 5711.82 7802.64
Mean Perceived pressure target -> target 1.81 0.91 3.67 1.000 8662.89 8590.64
Mean Perceived pressure target -> agent 0.53 0.25 1.12 1.001 6973.14 8027.90
Mean Perceived pushing target -> target 0.48 0.18 1.21 1.001 6257.83 7999.08
Mean Perceived pushing target -> agent 0.60 0.27 1.33 1.000 8526.30 8621.42
Mean weartime NA NA NA NA NA NA
Difference study group 2 0.77 0.53 1.12 1.001 6005.38 8208.71
Difference study group 3 0.71 0.49 1.04 1.001 6188.10 7909.98
Random Effects
sd(Intercept) 0.68 0.50 0.91 1.00 3038.84 6473.22
sd(Daily perceived persuasion target -> target) 0.20 0.06 0.35 1.00 3222.10 2462.17
sd(Daily perceived persuasion target -> agent) 0.20 0.06 0.36 1.00 4636.32 4252.86
sd(Daily perceived pressure target -> target) 0.15 0.01 0.47 1.00 6811.14 4855.94
sd(Daily perceived pressure target -> agent) 0.15 0.01 0.45 1.00 7445.35 5691.62
sd(Daily perceived pushing target -> target) 0.22 0.01 0.51 1.00 3401.48 4148.64
sd(Daily perceived pushing target -> agent) 0.15 0.01 0.36 1.00 5060.24 5269.04
Additional Parameters
ar[1] 0.02 -0.94 0.94 1.00 13219.57 7395.63
nu NA NA NA NA NA NA
shape 0.14 0.13 0.14 1.00 16739.72 8265.30
sderr 0.05 0.00 0.13 1.00 7302.29 5677.79
sigma NA NA NA NA NA NA

Device Based MVPA

range(df_double$pa_obj, na.rm = T) 
## [1]   5.75 971.25
hist(df_double$pa_obj, breaks = 50)

df_double$pa_obj_log <- log(df_double$pa_obj)

hist(df_double$pa_obj_log, breaks = 50)

We tried negative binomial here as well for consistency, but the model did not converge. Poisson also did not work. As we have no zeros in this distribution, we log transform.

formula <- bf(
  pa_obj_log ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    #support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    isWeekend + 
    got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    studyGroup +
    
    day + weartime_self_cw + weartime_self_cb +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 2.5)", class = "b"),
  brms::set_prior("normal(0, 50)", class = "Intercept", lb = 0),
  
  brms::set_prior("normal(0, 10)", class = "sd", group = "coupleID", lb = 0),
  
  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


#df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

pa_obj_log <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.99),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "NoExchangeProcesses_pa_obj_log")
)
# plotting with the first imputed dataset. 
pp_check(pa_obj_log, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(pa_obj_log)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(pa_obj_log)
## 
## Computed from 12000 by 3337 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo  -2810.5  55.5
## p_loo       103.6   4.7
## looic      5620.9 111.1
## ------
## MCSE of elpd_loo is 0.1.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.4, 2.4]).
## 
## All Pareto k estimates are good (k < 0.7).
## See help('pareto-k-diagnostic') for details.
plot(pa_obj_log, ask = FALSE)

summarize_brms(
  pa_obj_log, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
exp(Est.) l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 111.72* 98.11 126.93 1.000 4652.13 7297.52
Within-Person Effects
Daily perceived persuasion target -> target 1.00 0.98 1.02 1.000 24791.36 9690.94
Daily perceived persuasion target -> agent 1.02* 1.00 1.05 1.000 26829.56 9092.49
Daily perceived pressure target -> target 0.99 0.94 1.04 1.001 28584.78 8359.60
Daily perceived pressure target -> agent 1.01 0.96 1.07 1.001 27637.42 9431.01
Daily perceived pushing target -> target 1.01 0.98 1.04 1.000 27858.19 9557.47
Daily perceived pushing target -> agent 0.98 0.95 1.01 1.001 25387.85 9302.99
Day 0.94 0.84 1.06 1.000 18061.18 9461.26
Daily weartime 1.00 1.00 1.00 1.001 12266.99 8465.38
Daily perceived support target -> target NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA
Is a weekend 1.01 0.97 1.06 1.001 30627.70 8692.92
JITAI received 0.95 0.90 1.01 1.001 28591.75 8944.94
Days post skilled support intervention 1.08 0.99 1.18 1.001 18912.21 8952.12
Between-Person Effects
Mean perceived persuasion target -> target 0.87 0.74 1.04 1.000 8969.15 9607.83
Mean Perceived persuasion target -> agent 1.07 0.90 1.28 1.000 8872.98 9593.22
Mean Perceived pressure target -> target 1.12 0.89 1.41 1.000 15223.03 9540.37
Mean Perceived pressure target -> agent 0.79* 0.64 0.97 1.001 13154.40 9642.93
Mean Perceived pushing target -> target 1.08 0.81 1.43 1.000 11425.72 9917.88
Mean Perceived pushing target -> agent 1.21 0.96 1.53 1.000 13354.93 10265.25
Mean weartime 1.00* 1.00 1.00 1.001 12881.03 10113.33
Difference study group 2 0.97 0.86 1.09 1.000 8990.05 9292.09
Difference study group 3 1.12 0.99 1.26 1.000 9200.34 9206.79
Random Effects
sd(Intercept) 0.27 0.20 0.35 1.00 3862.37 6162.94
sd(Daily perceived persuasion target -> target) 0.06 0.03 0.09 1.00 8282.89 7931.39
sd(Daily perceived persuasion target -> agent) 0.05 0.02 0.08 1.00 7019.88 5867.95
sd(Daily perceived pressure target -> target) 0.06 0.00 0.15 1.00 5222.75 7063.60
sd(Daily perceived pressure target -> agent) 0.04 0.00 0.10 1.00 8000.64 7186.93
sd(Daily perceived pushing target -> target) 0.07 0.01 0.15 1.00 3179.43 3294.71
sd(Daily perceived pushing target -> agent) 0.04 0.00 0.09 1.00 5489.70 6753.23
Additional Parameters
ar[1] 0.28 0.24 0.31 1.00 27463.61 8529.55
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.55 0.54 0.57 1.00 26453.44 8845.89

Affect

range(df_double$aff, na.rm = T) 
## [1] 1 6
hist(df_double$aff, breaks = 15)

formula <- bf(
  aff ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    #support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    isWeekend + 
    got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=6), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
  
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

mood <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "NoExchangeProcesses_mood")
)
pp_check(mood, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(mood)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(mood)
## 
## Computed from 12000 by 3736 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo  -4820.2  63.7
## p_loo        95.7   4.4
## looic      9640.3 127.4
## ------
## MCSE of elpd_loo is 0.1.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.4, 2.1]).
## 
## All Pareto k estimates are good (k < 0.7).
## See help('pareto-k-diagnostic') for details.
plot(mood, ask = FALSE)

summarize_brms(
  mood, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = F) %>%
  print_df(rows_to_pack = rows_to_pack)
b l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 5.00* 4.75 5.26 1.001 2327.62 4864.24
Within-Person Effects
Daily perceived persuasion target -> target 0.02 -0.01 0.05 1.000 20539.96 9342.17
Daily perceived persuasion target -> agent -0.02 -0.05 0.01 1.001 20223.33 9689.95
Daily perceived pressure target -> target -0.03 -0.11 0.04 1.001 21024.26 9182.26
Daily perceived pressure target -> agent 0.04 -0.04 0.11 1.000 21104.10 9259.70
Daily perceived pushing target -> target -0.05* -0.10 -0.01 1.000 20182.24 9308.33
Daily perceived pushing target -> agent 0.01 -0.04 0.06 1.001 20419.75 9782.10
Day -0.05 -0.26 0.17 1.001 11973.48 9938.21
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA
Is a weekend 0.03 -0.04 0.09 1.000 21209.24 9311.37
JITAI received 0.01 -0.07 0.09 1.001 21438.55 9304.93
Days post skilled support intervention -0.02 -0.17 0.14 1.001 11765.42 9514.17
Between-Person Effects
Mean perceived persuasion target -> target 0.21 -0.10 0.53 1.000 6222.63 8081.50
Mean Perceived persuasion target -> agent 0.06 -0.25 0.37 1.000 6163.32 8108.96
Mean Perceived pressure target -> target 0.04 -0.32 0.40 1.000 10686.98 8869.84
Mean Perceived pressure target -> agent -0.09 -0.48 0.30 1.000 8518.94 8989.40
Mean Perceived pushing target -> target -0.35 -0.87 0.18 1.000 7298.11 9283.56
Mean Perceived pushing target -> agent -0.13 -0.59 0.32 1.000 8375.41 8988.22
Mean weartime NA NA NA NA NA NA
Difference study group 2 -0.26* -0.48 -0.04 1.001 7351.79 8979.59
Difference study group 3 -0.02 -0.23 0.19 1.000 7757.12 8822.05
Random Effects
sd(Intercept) 0.62 0.49 0.80 1.00 3059.78 5908.11
sd(Daily perceived persuasion target -> target) 0.02 0.00 0.07 1.00 4888.52 5354.51
sd(Daily perceived persuasion target -> agent) 0.05 0.00 0.11 1.00 2662.16 3086.86
sd(Daily perceived pressure target -> target) 0.09 0.00 0.25 1.00 4398.46 5354.74
sd(Daily perceived pressure target -> agent) 0.15 0.01 0.33 1.00 3094.32 3669.04
sd(Daily perceived pushing target -> target) 0.09 0.02 0.16 1.00 4352.59 2736.33
sd(Daily perceived pushing target -> agent) 0.08 0.01 0.16 1.00 3779.84 3730.07
Additional Parameters
ar[1] 0.45 0.42 0.48 1.00 19434.96 8729.36
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.87 0.85 0.89 1.00 21076.97 9127.69

reactance

range(df_double$reactance, na.rm = T) 
## [1] 0 5
hist(df_double$reactance, breaks = 6)

formula <- bf(
  reactance ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    #support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    isWeekend + 
    got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=5), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

reactance <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "NoExchangeProcesses_reactance")

)
pp_check(reactance, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(reactance)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(reactance)
## 
## Computed from 12000 by 756 log-likelihood matrix.
## 
##          Estimate   SE
## elpd_loo  -1080.5 34.1
## p_loo        90.5  8.4
## looic      2160.9 68.3
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.5, 1.9]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)     743   98.3%   386     
##    (0.7, 1]   (bad)       13    1.7%   <NA>    
##    (1, Inf)   (very bad)   0    0.0%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(reactance, ask = FALSE)

summary(reactance)
##  Family: gaussian 
##   Links: mu = identity; sigma = identity 
## Formula: reactance ~ persuasion_self_cw + persuasion_partner_cw + pressure_self_cw + pressure_partner_cw + pushing_self_cw + pushing_partner_cw + isWeekend + got_JITAI_self + skilled_support + persuasion_self_cb + persuasion_partner_cb + pressure_self_cb + pressure_partner_cb + pushing_self_cb + pushing_partner_cb + studyGroup + day + (persuasion_self_cw + persuasion_partner_cw + pressure_self_cw + pressure_partner_cw + pushing_self_cw + pushing_partner_cw | coupleID) 
##          autocor ~ ar(time = day, gr = coupleID:userID, p = 1)
##    Data: data (Number of observations: 756) 
##   Draws: 4 chains, each with iter = 5000; warmup = 2000; thin = 1;
##          total post-warmup draws = 12000
## 
## Correlation Structures:
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## ar[1]     0.01      0.04    -0.08     0.09 1.00    16261    10139
## 
## Multilevel Hyperparameters:
## ~coupleID (Number of levels: 38) 
##                                                Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)                                      0.57      0.09     0.43     0.76 1.00     6332     8116
## sd(persuasion_self_cw)                             0.06      0.04     0.00     0.15 1.00     3432     6372
## sd(persuasion_partner_cw)                          0.04      0.03     0.00     0.12 1.00     7787     6983
## sd(pressure_self_cw)                               0.43      0.10     0.26     0.65 1.00     8383     9184
## sd(pressure_partner_cw)                            0.25      0.16     0.02     0.63 1.00     3213     5167
## sd(pushing_self_cw)                                0.08      0.06     0.00     0.22 1.00     3147     5424
## sd(pushing_partner_cw)                             0.04      0.04     0.00     0.14 1.00     7904     7727
## cor(Intercept,persuasion_self_cw)                 -0.17      0.31    -0.70     0.50 1.00    12101     8942
## cor(Intercept,persuasion_partner_cw)               0.05      0.33    -0.59     0.67 1.00    22979     9001
## cor(persuasion_self_cw,persuasion_partner_cw)     -0.01      0.35    -0.68     0.66 1.00    16677     9210
## cor(Intercept,pressure_self_cw)                    0.29      0.20    -0.13     0.66 1.00     8113     9105
## cor(persuasion_self_cw,pressure_self_cw)          -0.14      0.33    -0.72     0.56 1.00     3965     6019
## cor(persuasion_partner_cw,pressure_self_cw)       -0.01      0.35    -0.67     0.66 1.00     3783     6791
## cor(Intercept,pressure_partner_cw)                 0.20      0.25    -0.29     0.67 1.00    11119     9291
## cor(persuasion_self_cw,pressure_partner_cw)        0.03      0.35    -0.64     0.69 1.00     9266     8936
## cor(persuasion_partner_cw,pressure_partner_cw)    -0.02      0.35    -0.68     0.66 1.00     8525    10027
## cor(pressure_self_cw,pressure_partner_cw)         -0.01      0.31    -0.57     0.60 1.00    13805     9675
## cor(Intercept,pushing_self_cw)                    -0.03      0.27    -0.55     0.52 1.00    14473     8053
## cor(persuasion_self_cw,pushing_self_cw)           -0.02      0.35    -0.66     0.65 1.00    10965     8235
## cor(persuasion_partner_cw,pushing_self_cw)         0.03      0.36    -0.64     0.69 1.00     9596     9096
## cor(pressure_self_cw,pushing_self_cw)              0.06      0.33    -0.58     0.66 1.00    13379    10395
## cor(pressure_partner_cw,pushing_self_cw)           0.02      0.36    -0.67     0.68 1.00     8888    10529
## cor(Intercept,pushing_partner_cw)                  0.01      0.31    -0.61     0.62 1.00    21452     8335
## cor(persuasion_self_cw,pushing_partner_cw)         0.02      0.36    -0.67     0.69 1.00    19779     9389
## cor(persuasion_partner_cw,pushing_partner_cw)     -0.03      0.36    -0.69     0.65 1.00    14266     9483
## cor(pressure_self_cw,pushing_partner_cw)          -0.07      0.35    -0.71     0.61 1.00    17400     9525
## cor(pressure_partner_cw,pushing_partner_cw)        0.02      0.36    -0.66     0.68 1.00    13224    10505
## cor(pushing_self_cw,pushing_partner_cw)            0.01      0.36    -0.67     0.68 1.00    10715    10691
## 
## Regression Coefficients:
##                                      Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept                                0.49      0.16     0.18     0.80 1.00     6934     9239
## persuasion_self_cw                       0.03      0.03    -0.02     0.08 1.00    24993     9643
## persuasion_partner_cw                   -0.00      0.03    -0.06     0.06 1.00    21491    10145
## pressure_self_cw                        -0.02      0.05    -0.12     0.07 1.00    22846     8636
## pressure_partner_cw                     -0.01      0.07    -0.14     0.12 1.00    21887     9584
## pushing_self_cw                          0.03      0.03    -0.03     0.09 1.00    23325     8602
## pushing_partner_cw                      -0.02      0.04    -0.10     0.06 1.00    22990     9574
## isWeekendWeekend                        -0.00      0.08    -0.16     0.15 1.00    29494     8887
## got_JITAI_selfJITAIreceived              0.05      0.11    -0.17     0.27 1.00    23888     8652
## skilled_supportDaysafterIntervention    -0.05      0.13    -0.31     0.21 1.00    15180    10054
## persuasion_self_cb                      -0.10      0.20    -0.48     0.28 1.00    10258     9480
## persuasion_partner_cb                    0.19      0.20    -0.21     0.59 1.00    11577     9929
## pressure_self_cb                         0.21      0.23    -0.23     0.64 1.00    12411     9366
## pressure_partner_cb                     -0.13      0.24    -0.61     0.36 1.00    11927     9501
## pushing_self_cb                         -0.25      0.31    -0.86     0.37 1.00     9829     9017
## pushing_partner_cb                      -0.06      0.31    -0.68     0.55 1.00    11045     9483
## studyGroupFirst3weeksinterventions      -0.01      0.13    -0.26     0.24 1.00    14544    10069
## studyGrouplast3weeksinterventions        0.19      0.15    -0.09     0.48 1.00    12160     9856
## day                                     -0.11      0.20    -0.50     0.28 1.00    15201    10190
## 
## Further Distributional Parameters:
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma     0.94      0.03     0.89     1.00 1.00    12997     8890
## 
## Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
summarize_brms(
  reactance, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = F) %>%
  print_df(rows_to_pack = rows_to_pack)
b l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 0.49* 0.18 0.80 1.000 6934.23 9239.36
Within-Person Effects
Daily perceived persuasion target -> target 0.03 -0.02 0.08 1.000 24992.65 9642.89
Daily perceived persuasion target -> agent 0.00 -0.06 0.06 1.000 21490.92 10144.92
Daily perceived pressure target -> target -0.02 -0.12 0.07 1.000 22845.85 8636.16
Daily perceived pressure target -> agent -0.01 -0.14 0.12 1.001 21886.84 9583.52
Daily perceived pushing target -> target 0.03 -0.03 0.09 1.001 23325.38 8601.96
Daily perceived pushing target -> agent -0.02 -0.10 0.06 1.000 22989.85 9574.35
Day -0.11 -0.50 0.28 1.000 15200.84 10190.37
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA
Is a weekend 0.00 -0.16 0.15 1.000 29494.30 8887.17
JITAI received 0.05 -0.17 0.27 1.000 23887.58 8652.34
Days post skilled support intervention -0.05 -0.31 0.21 1.000 15180.24 10053.60
Between-Person Effects
Mean perceived persuasion target -> target -0.10 -0.48 0.28 1.000 10257.56 9480.31
Mean Perceived persuasion target -> agent 0.19 -0.21 0.59 1.000 11576.88 9929.12
Mean Perceived pressure target -> target 0.21 -0.23 0.64 1.000 12410.93 9366.06
Mean Perceived pressure target -> agent -0.13 -0.61 0.36 1.000 11926.72 9501.40
Mean Perceived pushing target -> target -0.25 -0.86 0.37 1.000 9829.29 9016.87
Mean Perceived pushing target -> agent -0.06 -0.68 0.55 1.000 11045.03 9482.70
Mean weartime NA NA NA NA NA NA
Difference study group 2 -0.01 -0.26 0.24 1.000 14544.38 10069.16
Difference study group 3 0.19 -0.09 0.48 1.000 12159.77 9855.57
Random Effects
sd(Intercept) 0.57 0.43 0.76 1.00 6332.22 8116.25
sd(Daily perceived persuasion target -> target) 0.06 0.00 0.15 1.00 3431.74 6372.27
sd(Daily perceived persuasion target -> agent) 0.04 0.00 0.12 1.00 7787.30 6983.34
sd(Daily perceived pressure target -> target) 0.43 0.26 0.65 1.00 8382.68 9183.84
sd(Daily perceived pressure target -> agent) 0.25 0.02 0.63 1.00 3213.34 5167.05
sd(Daily perceived pushing target -> target) 0.08 0.00 0.22 1.00 3146.70 5424.45
sd(Daily perceived pushing target -> agent) 0.04 0.00 0.14 1.00 7904.22 7726.65
Additional Parameters
ar[1] 0.01 -0.08 0.09 1.00 16260.83 10139.34
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.94 0.89 1.00 1.00 12996.61 8890.45

Binary Version

introduce_binary_reactance <- function(data) {
  data$is_reactance <- factor(data$reactance > 0, levels = c(FALSE, TRUE), labels = c(0, 1))
  return(data)
}



df_double <- introduce_binary_reactance(df_double)
if (use_mi) {
  for (i in seq_along(implist)) {
    implist[[i]] <- introduce_binary_reactance(implist[[i]])
  }
}


formula <- bf(
  is_reactance ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    #support_self_cw + support_partner_cw + support_partner_cw +
    #comf_self_cw + reas_self_cw + 
    isWeekend + 
    got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=5), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1)
  #brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

is_reactance <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = bernoulli(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "NoExchangeProcesses_is_reactance")

)
pp_check(is_reactance, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(is_reactance)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

try(loo(is_reactance))
## 
## Computed from 12000 by 756 log-likelihood matrix.
## 
##          Estimate   SE
## elpd_loo   -465.3 17.9
## p_loo       418.2 16.7
## looic       930.6 35.7
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.7, 1.3]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)       3    0.4%   288     
##    (0.7, 1]   (bad)      192   25.4%   <NA>    
##    (1, Inf)   (very bad) 561   74.2%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(is_reactance, ask = FALSE)

summarize_brms(
  is_reactance, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
OR l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 1.14 0.03 37.01 1.000 9740.12 9108.41
Within-Person Effects
Daily perceived persuasion target -> target 1.57 0.71 3.82 1.000 8664.83 8458.01
Daily perceived persuasion target -> agent 1.01 0.36 2.79 1.000 8440.17 8640.88
Daily perceived pressure target -> target 0.98 0.21 4.62 1.000 8347.75 8628.67
Daily perceived pressure target -> agent 0.78 0.10 5.77 1.000 8639.29 7851.79
Daily perceived pushing target -> target 1.45 0.56 4.16 1.000 8426.87 8506.75
Daily perceived pushing target -> agent 0.61 0.16 2.11 1.000 8099.87 8258.42
Day 1.84 0.01 338.50 1.000 9903.93 9141.30
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA
Is a weekend 0.54 0.04 6.05 1.001 9605.93 9331.71
JITAI received 10.28 0.42 301.32 1.000 8588.66 9096.21
Days post skilled support intervention 0.11 0.00 4.11 1.001 8738.36 8546.55
Between-Person Effects
Mean perceived persuasion target -> target 0.39 0.00 42.34 1.001 9946.86 8971.35
Mean Perceived persuasion target -> agent 11.82 0.13 1182.70 1.000 9919.40 9231.20
Mean Perceived pressure target -> target 3.49 0.02 488.58 1.001 10474.77 9629.59
Mean Perceived pressure target -> agent 0.61 0.00 133.79 1.000 9773.68 9121.66
Mean Perceived pushing target -> target 0.30 0.00 217.37 1.000 10497.97 9182.97
Mean Perceived pushing target -> agent 0.13 0.00 94.75 1.000 11053.69 9511.68
Mean weartime NA NA NA NA NA NA
Difference study group 2 0.61 0.01 23.13 1.001 8866.64 8665.21
Difference study group 3 8.74 0.18 525.61 1.000 9131.08 9073.80
Random Effects
sd(Intercept) 7.26 5.04 9.78 1.00 8403.15 7339.19
sd(Daily perceived persuasion target -> target) 1.68 0.30 3.38 1.00 2993.92 2938.75
sd(Daily perceived persuasion target -> agent) 1.42 0.08 3.21 1.00 2742.87 4428.71
sd(Daily perceived pressure target -> target) 3.29 1.31 5.59 1.00 4930.17 4633.99
sd(Daily perceived pressure target -> agent) 1.28 0.05 3.70 1.00 7413.44 7611.55
sd(Daily perceived pushing target -> target) 0.91 0.04 2.42 1.00 3380.26 6170.55
sd(Daily perceived pushing target -> agent) 0.85 0.04 2.49 1.00 6790.81 8065.90
Additional Parameters
ar[1] 0.10 -0.09 0.29 1.00 3017.69 5131.00
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr 9.56 6.04 14.10 1.00 4489.77 6495.99
sigma NA NA NA NA NA NA

Report All Models

if (report_ordinal) {
  model_rows_random_final <- model_rows_random_ordinal
  model_rows_fixed_final <- model_rows_fixed_ordinal
  model_rownames_fixed_final <- model_rownames_fixed_ordinal
  model_rownames_random_final <- model_rownames_random_ordinal
  rows_to_pack_final <- rows_to_pack_ordinal
} else {
  model_rows_random_final <- model_rows_random
  model_rows_fixed_final <- model_rows_fixed
  model_rownames_fixed_final <- model_rownames_fixed
  model_rownames_random_final <- model_rownames_random
  rows_to_pack_final <- rows_to_pack
}



all_models <- report_side_by_side(
  pa_sub,
  pa_obj_log,
  mood,
  reactance,
  is_reactance,
  
  model_rows_random = model_rows_random_final,
  model_rows_fixed = model_rows_fixed_final,
  model_rownames_random = model_rownames_random_final,
  model_rownames_fixed = model_rownames_fixed_final
) 
## [1] "pa_sub"
## [1] "pa_obj_log"
## [1] "mood"
## [1] "reactance"
## [1] "is_reactance"
# pretty printing
summary_all_models <- all_models %>%
  print_df(rows_to_pack = rows_to_pack_final) %>%
  add_header_above(
    c(" ", "Subjective MVPA" = 2, 
      "Device-Based MVPA" = 2, 
      "Mood" = 2,
      "Reactance Gaussian" = 2, 
      "Reactance Dichotome" = 2)
  )

export_xlsx(summary_all_models, 
            rows_to_pack = rows_to_pack_final,
            file.path("Output", "SensitivityCovariates",
                      "NoExchangeProcesses_AllModels_SensCovariates.xlsx"),
            merge_option = 'both', 
            simplify_2nd_row = TRUE,
            colwidths = c(40, 7.4, 12.85, 7.4, 12.85,7.4, 12.85,7.4, 12.85,7.4, 12.85),
            line_above_rows = c(1,2,3,28),
            line_below_rows = c(-1))

summary_all_models
Subjective MVPA
Device-Based MVPA
Mood
Reactance Gaussian
Reactance Dichotome
IRR pa_sub 95% CI pa_sub exp(Est.) pa_obj_log 95% CI pa_obj_log b mood 95% CI mood b reactance 95% CI reactance OR is_reactance 95% CI is_reactance
Intercept 31.71* [20.56, 49.41] 111.72* [98.11, 126.93] 5.00* [ 4.75, 5.26] 0.49* [ 0.18, 0.80] 1.14 [0.03, 37.01]
Within-Person Effects
Daily perceived persuasion target -> target 0.98 [ 0.88, 1.10] 1.00 [ 0.98, 1.02] 0.02 [-0.01, 0.05] 0.03 [-0.02, 0.08] 1.57 [0.71, 3.82]
Daily perceived persuasion target -> agent 0.93 [ 0.84, 1.04] 1.02* [ 1.00, 1.05] -0.02 [-0.05, 0.01] 0.00 [-0.06, 0.06] 1.01 [0.36, 2.79]
Daily perceived pressure target -> target 1.02 [ 0.78, 1.37] 0.99 [ 0.94, 1.04] -0.03 [-0.11, 0.04] -0.02 [-0.12, 0.07] 0.98 [0.21, 4.62]
Daily perceived pressure target -> agent 0.65* [ 0.52, 0.85] 1.01 [ 0.96, 1.07] 0.04 [-0.04, 0.11] -0.01 [-0.14, 0.12] 0.78 [0.10, 5.77]
Daily perceived pushing target -> target 1.03 [ 0.89, 1.22] 1.01 [ 0.98, 1.04] -0.05* [-0.10, -0.01] 0.03 [-0.03, 0.09] 1.45 [0.56, 4.16]
Daily perceived pushing target -> agent 1.11 [ 0.95, 1.30] 0.98 [ 0.95, 1.01] 0.01 [-0.04, 0.06] -0.02 [-0.10, 0.06] 0.61 [0.16, 2.11]
Day 0.98 [ 0.64, 1.54] 0.94 [ 0.84, 1.06] -0.05 [-0.26, 0.17] -0.11 [-0.50, 0.28] 1.84 [0.01, 338.50]
Daily weartime NA NA 1.00 [ 1.00, 1.00] NA NA NA NA NA NA
Daily perceived support target -> target NA NA NA NA NA NA NA NA NA NA
Daily perceived support target -> agent NA NA NA NA NA NA NA NA NA NA
Is a weekend 1.04 [ 0.85, 1.28] 1.01 [ 0.97, 1.06] 0.03 [-0.04, 0.09] 0.00 [-0.16, 0.15] 0.54 [0.04, 6.05]
JITAI received 0.96 [ 0.74, 1.26] 0.95 [ 0.90, 1.01] 0.01 [-0.07, 0.09] 0.05 [-0.17, 0.27] 10.28 [0.42, 301.32]
Days post skilled support intervention 1.10 [ 0.78, 1.53] 1.08 [ 0.99, 1.18] -0.02 [-0.17, 0.14] -0.05 [-0.31, 0.21] 0.11 [0.00, 4.11]
Between-Person Effects
Mean perceived persuasion target -> target 1.12 [ 0.66, 1.93] 0.87 [ 0.74, 1.04] 0.21 [-0.10, 0.53] -0.10 [-0.48, 0.28] 0.39 [0.00, 42.34]
Mean Perceived persuasion target -> agent 1.22 [ 0.70, 2.13] 1.07 [ 0.90, 1.28] 0.06 [-0.25, 0.37] 0.19 [-0.21, 0.59] 11.82 [0.13, 1182.70]
Mean Perceived pressure target -> target 1.81 [ 0.91, 3.67] 1.12 [ 0.89, 1.41] 0.04 [-0.32, 0.40] 0.21 [-0.23, 0.64] 3.49 [0.02, 488.58]
Mean Perceived pressure target -> agent 0.53 [ 0.25, 1.12] 0.79* [ 0.64, 0.97] -0.09 [-0.48, 0.30] -0.13 [-0.61, 0.36] 0.61 [0.00, 133.79]
Mean Perceived pushing target -> target 0.48 [ 0.18, 1.21] 1.08 [ 0.81, 1.43] -0.35 [-0.87, 0.18] -0.25 [-0.86, 0.37] 0.30 [0.00, 217.37]
Mean Perceived pushing target -> agent 0.60 [ 0.27, 1.33] 1.21 [ 0.96, 1.53] -0.13 [-0.59, 0.32] -0.06 [-0.68, 0.55] 0.13 [0.00, 94.75]
Mean weartime NA NA 1.00* [ 1.00, 1.00] NA NA NA NA NA NA
Difference study group 2 0.77 [ 0.53, 1.12] 0.97 [ 0.86, 1.09] -0.26* [-0.48, -0.04] -0.01 [-0.26, 0.24] 0.61 [0.01, 23.13]
Difference study group 3 0.71 [ 0.49, 1.04] 1.12 [ 0.99, 1.26] -0.02 [-0.23, 0.19] 0.19 [-0.09, 0.48] 8.74 [0.18, 525.61]
Random Effects
sd(Intercept) 0.68 [ 0.50, 0.91] 0.27 [0.20, 0.35] 0.62 [0.49, 0.80] 0.57 [ 0.43, 0.76] 7.26 [ 5.04, 9.78]
sd(Daily perceived persuasion target -> target) 0.20 [ 0.06, 0.35] 0.06 [0.03, 0.09] 0.02 [0.00, 0.07] 0.06 [ 0.00, 0.15] 1.68 [ 0.30, 3.38]
sd(Daily perceived persuasion target -> agent) 0.20 [ 0.06, 0.36] 0.05 [0.02, 0.08] 0.05 [0.00, 0.11] 0.04 [ 0.00, 0.12] 1.42 [ 0.08, 3.21]
sd(Daily perceived pressure target -> target) 0.15 [ 0.01, 0.47] 0.06 [0.00, 0.15] 0.09 [0.00, 0.25] 0.43 [ 0.26, 0.65] 3.29 [ 1.31, 5.59]
sd(Daily perceived pressure target -> agent) 0.15 [ 0.01, 0.45] 0.04 [0.00, 0.10] 0.15 [0.01, 0.33] 0.25 [ 0.02, 0.63] 1.28 [ 0.05, 3.70]
sd(Daily perceived pushing target -> target) 0.22 [ 0.01, 0.51] 0.07 [0.01, 0.15] 0.09 [0.02, 0.16] 0.08 [ 0.00, 0.22] 0.91 [ 0.04, 2.42]
sd(Daily perceived pushing target -> agent) 0.15 [ 0.01, 0.36] 0.04 [0.00, 0.09] 0.08 [0.01, 0.16] 0.04 [ 0.00, 0.14] 0.85 [ 0.04, 2.49]
Additional Parameters
ar[1] 0.02 [-0.94, 0.94] 0.28 [0.24, 0.31] 0.45 [0.42, 0.48] 0.01 [-0.08, 0.09] 0.10 [-0.09, 0.29]
nu NA NA NA NA NA NA NA NA NA NA
shape 0.14 [ 0.13, 0.14] NA NA NA NA NA NA NA NA
sderr 0.05 [ 0.00, 0.13] NA NA NA NA NA NA 9.56 [ 6.04, 14.10]
sigma NA NA 0.55 [0.54, 0.57] 0.87 [0.85, 0.89] 0.94 [ 0.89, 1.00] NA NA
report::report_system()

Analyses were conducted using the R Statistical language (version 4.4.1; R Core Team, 2024) on Windows 11 x64 (build 22635)

report::cite_packages()